package org.jmh.gift.util;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Objects;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class TenantBase {

    private Long tenantId;
    private String tenantName;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TenantBase that = (TenantBase) o;
        return Objects.equals(tenantId, that.tenantId) &&
                Objects.equals(tenantName, that.tenantName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(tenantId, tenantName);
    }

    @Override
    public String toString() {
        return "{" +
                "tenantId:" + tenantId +
                ", tenantName:'" + tenantName + '\'' +
                '}';
    }
}
